import request
# 原子不可变数据类型（str，bytes和数值类型）都是hashable类型
# >>> a = [1, 5, 2, 1, 9, 1, 5, 10]
# >>> list(dedupe(a))
# [1, 5, 2, 9, 10]
# >>>

# >>> a = [ {'x':1, 'y':2}, {'x':1, 'y':3}, {'x':1, 'y':2}, {'x':2, 'y':4}]
# >>> list(dedupe(a, key=lambda d: (d['x'],d['y'])))
# [{'x': 1, 'y': 2}, {'x': 1, 'y': 3}, {'x': 2, 'y': 4}]
# >>> list(dedupe(a, key=lambda d: d['x']))
# [{'x': 1, 'y': 2}, {'x': 2, 'y': 4}]
# >>>